package com.rongxun.utils;

import android.content.Context;
import android.text.TextUtils;

import com.rongxun.widget.CustomWaitDialogUtil;

/**
 * 创建者     wk
 * 创建时间   2018/6/26 18:31
 * 描述
 */
public class HttpDialogUtils {
    /**
     * 显示网络请求的dialog
     *
     * @param context
     * @param canceledOnTouchOutside
     * @param messageText
     */
    public static void showDialog(Context context, boolean canceledOnTouchOutside, String messageText) {
        if (context != null) {
            if (TextUtils.isEmpty(messageText)) {
                CustomWaitDialogUtil.showWaitDialog(context, canceledOnTouchOutside);
            } else {
                CustomWaitDialogUtil.showWaitDialog(context, "", canceledOnTouchOutside);
            }
        }
    }

    public static void dismissDialog() {
        CustomWaitDialogUtil.stopWaitDialog();
    }
}
